package com.cdyZuul.config;

import entity.IpRuleChecker;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Set;

/**
 * @author ：cdy
 * @date ：Created in 2020/11/13 9:16
 * @description：www.cdyong.cn
 */
@Configuration
public class IpRuleCheckerConfig {
    //可以从数据库中获取ip名单
    @Bean("IpRuleChecker")
    public IpRuleChecker IpRuleChecker() {

        return new IpRuleChecker() {
            @Override
            public boolean check(String userIp) {
                return false;
            }
            @Override
            public Set<String> exceptApps() {
                return null;
            }
        };
    }
}
